﻿@using AP.Framework.Utilities.MvcPager
@model PagedList<ApCMS.Models.ProductModels>
@{
    ViewBag.Title = "产品展示";
}
@section Header{
    <a href="@Url.Action("Index", "Home")" data-icon="back">返回</a>
    <h1>@(ViewBag.Title)</h1>
    <a href="@Url.Action("Index", "Home")" data-icon="grid">首页</a>
}
@using (Html.BeginForm("Index", "Product", FormMethod.Get))
{
    <ul data-role="listview">
        <li data-role="fieldcontain">
            <label>
                产品分类：</label>
            @Html.DropDownList("ProductCate", (IEnumerable<SelectListItem>)ViewBag.ProductCategoryList, "--请选择--")
        </li>
        <li data-role="fieldcontain">
            <label>
                名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：</label>
            <input type="text" class="searchText" name="SearchValue">
        </li>
        <li>
            <input type="submit" class="button" value="搜索" /></li>
    </ul>    
}
<div>
    <ul data-role="listview">
        @foreach (var list in Model)
        {       
            <li>
                <img  alt="@(list.Name)" src="@(list.Photo)"
        <h2>
            名称： @list.Name</h2>
                <p>
                </p>
                <br />
                <p>
                    描述：@list.Description</p>
            </li>
        }
        <li>
            @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "page" })
        </li>
    </ul>
</div>
